import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class PasswodWindow extends JFrame {
    JPasswordField inputPassword;
    JTextField textShow;
    PasswordListener listener; 
    public PasswodWindow() { 
       init();
       setBounds(100,100,190,150);
       setVisible(true);
       setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }
    void init() {
       setLayout(new FlowLayout());
       inputPassword=new JPasswordField (10);
       textShow=new JTextField(16);
       textShow.setEditable(false);
       add(inputPassword);
       add(textShow);
       listener=new PasswordListener();
       listener.setJTextField(textShow);
       inputPassword.addActionListener(listener);
    }
}
